import api from "@/api";
import { PORT } from "../config/servicePort";

/**
 * 修改发货时效
 */
export const updateDeliveryTime = (params: any) => api.post(`${PORT}/BaseTimelines/edit`, params);

/**
 * 修改售后类别
 */
export const updateAfterSaleType = (params: any) => api.post(`${PORT}/BaseAftersalesOptions/edit`, params);

/**
 * 获取隐私协议
 */
export const getPrivacyAgreement = () => api.get(`${PORT}/Agreement/getInfo`);

/**
 * 更新隐私协议
 */
export const updatePrivacyAgreement = (params: any) => api.post(`${PORT}/Agreement/add`, params);

/**
 * 获取关于我们
 */
export const getAboutUs = () => api.get(`${PORT}/AboutUs/getInfo`);

/**
 * 更新关于我们
 */
export const updateAboutUs = (params: any) => api.post(`${PORT}/AboutUs/add`, params);

/**
 * 内测状态切换
 */
export const updateTestStatus = (data: any) => api.post(`${PORT}/InnerTestConfig/updateStatus`, data);

/**
 * 获取内测状态
 */
export const getTestStatus = () => api.get(`${PORT}/InnerTestConfig/getInfo`);

/**
 * 获取内测用户列表
 */
export const getTestUserList = (params: any) => api.get(`${PORT}/InnerTestUser/getList`, { params });

/**
 * 内测用户审核
 */
export const updateTestUserStatus = (data: any) => api.post(`${PORT}/InnerTestUser/updateStatus`, data);

/**
 * 删除内测用户
 */
export const deleteTestUser = (data: any) => api.post(`${PORT}/InnerTestUser/del`, data);
